This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Sure try this instead... ~Umberto Nongeroson 20.Jan.04 06:40 PM a Web browser Domino Designer All ReleasesWindows 2000
Sub Initialize
On Error Goto ErrorHandler
REM get the current database from the session
Dim ses As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim picklist As Variant
Dim newDoc As NotesDocument
Dim docToProcess As NotesDocument
Dim col As NotesDocumentCollection
Set db = ses.CurrentDatabase
REM get the unprocessed documents
Set col = db.UnprocessedDocuments
REM process the unprocessed documents
For docCount=1 To col.Count
REM get the document in the collection to process
Set docToProcess = col.GetNthDocument(docCount)
Print "Processing document "+Cstr(docCount) + " of "+Cstr(col.Count)
picklist = workspace.PickListStrings(PICKLIST_CUSTOM, True, "dcoirm1ln/DC/USEPA/US", _
"QS\OversightTest.nsf", "Training Events\by Code", "Select a training event", _
"Please select a course this student attended",2)
If Not Isempty(picklist) Then
Set newDoc = db.CreateDocument
With newDoc
.Form = "Student Record for CEU Course"
Call .ReplaceItemValue("Course_Num", picklist)
'ammend the following line with the proper field name for the student name
.StudentName = docToProcess.StudentName
.ComputeWithForm True,False
.Save True, True
End With
End If
REM update the doc we just processed so we do not process it again
' no need for this only used for agents that run on uprocessed documents
' Call ses.UpdateProcessedDoc(docToProcess)
Next
Exit Sub